Repository navigation
fix: TimescaleDB's pod reaps orphaned exec processes, so one killed by a signal no longer crash-restarts the database - #800
Merged
Conversation
…y a signal no longer crash-restarts the database
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TimescaleDB's postmaster was PID 1 in its pod. Anything a
kubectl execleaves behind when it's cut off (agent backups, restores, a dropped shell) becomes its child. When such an orphan later dies by a signal, Postgres logs "untracked child process … was terminated by signal 9" and crash-restarts the whole database.shareProcessNamespace: trueon the TimescaleDB pod: the pause container is PID 1 and reaps orphans. Nothing in the pod relies on postgres being PID 1: the probes are TCP, there is no preStop and nokill 1, the major upgrade runs in its own Job pod, and the runtime still sends SIGTERM to postgres on shutdown.tests/timescaledb/orphan_reaper_test.sh(TimescaleDB Docker job) uses the pinned image. With postgres as PID 1, a killed orphan restarts the database; with--initas PID 1, it doesn't.tests/scripts/timescaledb_pod_test.shchecks the setting is rendered in all four overlays update.sh applies.The rollout restarts the database once. If it ships in the same release as #796's reserved-slots change, both land in that one restart.